<%@ page language="java" contentType= "text/html" pageEncoding="UTF-8"%>
<%@include file="/include/common/formuihead1.jsp"%>
<%@include file="/include/common/formuihead2.jsp"%>
<%
	page1.getPageTitle().setTitle("%%{pagetitle}%%");
%>
<jm:form>
<jm:layout postion="north">
	<jm:toolbar deleteDisabled="true" cancelDisabled="false" cancelConfirm="true" exportDisabled="true" newDisabled="false" newEnab="false" printDisabled="true">
		<button name="newnext" icon="sx-tb-new" pos="1" value="新增下一筆" onclick="newNextRecord();"/>
	</jm:toolbar>
	<jm:pageTitle />
</jm:layout>

<jm:layout postion="center">
	<jm:error></jm:error>  
	<jm:dp id="dp1" data="<%=Utils.TAG_FORM%>" tabSize="1">
		<jm:tab colModel="">
			<jm:group colspan="1" hidden="true"> 
				<input name="ctn004sn" caption="主鍵值" type="text"/> 
				<input name="hr003tsn" type="text"/> 
			</jm:group>
			<input name="hrnum" caption="工號" type="text" required="true" width="150px"
				onchange="if(this.value.trim() != ''){$P.cmp({me:this,cmpid:'cmp004',hrnum:this.value,async:false});}else{$P.form.setRecord({},'chname,hr003tsn,hr003name|cmp_nm4');}" 
				ajaxsucc="$P.form.setRecord(jo.data,'chname,hr003tsn,hr003name|cmp_nm4')"
				ajaxfail="$P.form.setRecord({},'chname,hr003tsn,hr003name|cmp_nm4');" />
			<input name="chname" caption="姓名" type="text" enab="false" width="150px" required="true"/>
			<input name="hr003name" caption="部門" type="text" enab="false" width="150px" required="true"/>
			<jm:select name="groupName" caption="組別" codeList="景晟紡紗生管課" required="true" emptySupported="false" width="150px"/>
			<jm:select name="isleader" caption="是否是負負人" codeList="N;Y" emptySupported="false" width="150px"/>
			<jm:select name="enab" caption="狀態" codeList="1|啟用;0|取消;" emptySupported="false" width="150px"/>
		</jm:tab>
	</jm:dp> 
</jm:layout>
</jm:form>
<jm:script><script type="text/javascript" charset="UTF-8">
	//以下定义 action function ,on+action 命名function
	function newNextRecord(){
		if(confirm('確定新增一下筆资料?'))
			window.location.href='%%{pageName}%%.jsp';
	}
</script></jm:script>
<%@include file="/include/common/formuiend.jsp"%>
